Support for managing User API Tokens via SAML authentication#192
Merged
mhutchings-182 merged 19 commits intoMay 2, 2025
Conversation
|
Thanks @LowzG - we're reviewing at the moment! |
9adbcca to
da75881
Compare
LowzG
commented
Apr 30, 2025
jmccayCS
reviewed
May 1, 2025
jmccayCS
approved these changes
May 1, 2025
Contributor
jmccayCS
left a comment
There was a problem hiding this comment.
LGTM just one small comment there but not a blocker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For environments that only use SAML for authentication, there currently is no way to programmatically retrieve an existing User API Token. Currently the Cloudsmith CLI allows creating/retrieving User API Tokens only via the
login/tokencommand which uses basic auth.This is my hacky way of getting around these limitations. The
auth --tokencommand brings consistency between theloginandauthcommands, with one caveat: users with an existing token will be asked if they would like to refresh their token.This also includes the
tokenscommand that allows users to list and refresh their token.To remove the hacky parts of this implementations we need:
Authorizationheader without basic auth.